package cn.itsource.org.domain;

import cn.itsource.basic.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain implements Serializable {
    private String sn; //部门编号
    private String name;//部门名称
    private String dirPath;//
    private Integer state;//部门状态，0正常 -1禁用
    //上级领导
    private Employee manager;
    private Long manager_id;//部门领导Id

    private Long parent_id;//上级部门Id
    //上级部门
    private Department parent;

    //子部门
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//集合为空不反正json
    List<Department> children =new ArrayList<>();
}
